<%@page import="model.Category"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<%@page import="model.Author"%>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %><%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- includes -->
<%@ include file="../includes/includes.jsp"%>
<!-- fin includes -->
<title>Busqueda por articulo</title>
</head>
<body>
<!-- menu  -->
<%@ include file="../includes/header.jsp"%>
<!--  fin menu  -->
<div id="main">
<br>
<h2>Add News</h2>
<table border=0 cellspacing=5 cellpadding=5 width="100%">
	<form action="addnews2.jsp" method="POST">
	<tr>
		<td><b>Email Address</b></td>
		<td><select name="author">
			<%
			Author autor = new Author();
			List<Author> autores = autor.getAuthors("");
			for (Author a : autores) {
				String textoOption = a.getAuthor();
                out.println("<option>" + textoOption + "</option>");
			}
            %>
		</select>
		</td>
	</tr>
	<tr>
		<td><b>Categoria</b></td>
		<td><select name="category">
			<%
			Category cg = new Category();
			List<Category> categorias = cg.getCategories("");
			
			for (Category c : categorias) {
				int id = c.getIdCategory();
				String textoOption = c.getName();
                out.println("<option value='" + id + "'>" + textoOption + "</option>");
			}
			
            %>
		</select>
		</td>
	</tr>
	<tr>
		<td>Headline</td>
		<td><input type="Text" name="tittle" size="50"></td>
	</tr>

	<input type='hidden' name='date' value='<%=new java.util.Date()%>'>
	<!-- 
	<tr>
		<td>Body</td>
		<td><textarea name="bodyx" rows='24' cols='50'></textarea></td>
	</tr>
	 -->
	<tr>
	   <td width="100%" colspan="2">
	   <FCK:editor instanceName="EditorDefault" width="600px" height="400px">
				<jsp:attribute name="value">
				</jsp:attribute>
			</FCK:editor>
	</td>		
	   
	   
	</tr>
	
	<tr>
		<td colspan=2><input type="submit" name="submit" value="Add"></td>
	</tr>
	</form>
</table>



</div>

<!-- menu  -->
<%@ include file="../includes/menu.jsp"%>
<!--  fin menu  -->

<!-- footer  -->

<%@ include file="../includes/footer.jsp"%>
<!--  fin footer -->
</div>

</body>
</html>